import { request } from '../request'

// 获取 PDA 授权列表
export function fetchPdaAuthList(params: { keyword?: string; page: number; pageSize: number }) {
  return request({
    url: '/pda/list',
    method: 'get',
    params
  })
}

// 新增 PDA 授权
export function fetchAddPdaAuth(data: { code: string; remark: string }) {
  return request({
    url: '/pda/add',
    method: 'post',
    data
  })
}

// 修改 PDA 授权
export function fetchUpdatePdaAuth(data: { id: string; code: string; remark: string }) {
  return request({
    url: '/pda/update',
    method: 'post',
    data
  })
}

// 删除 PDA 授权
export function fetchDeletePdaAuth(id: string) {
  return request({
    url: '/pda/delete',
    method: 'post',
    data: { id }
  })
}
